package com.mxx.common.netty.interceptor;

import com.mxx.common.netty.http.NettyHttpResponse;

/**
 * @Auther: Mr. Zeng
 * @Date: 2020/7/17 12:17
 * @Description: 暂无描述
 */
public class Finish {
    public static final Finish SUCCESSFUL = new Finish(false, null);

    private boolean status;
    private NettyHttpResponse response;

    private Finish(boolean status, NettyHttpResponse response) {
        this.status = status;
        this.response = response;
    }

    public static Finish make(NettyHttpResponse response) {
        return new Finish(true, response);
    }

    public boolean doIntercept() {
        return this.status;
    }

    public NettyHttpResponse getResponse() {
        return response;
    }
}
